<?php

declare(strict_types=1);
/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://hyperf.wiki
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
 */

namespace App\Annotation;

use Attribute;
use Hyperf\Di\Annotation\AbstractAnnotation;

/**
 * 自定义注解
 * 创建一个注解类.
 * @internal
 * @coversNothing
 */
#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD)]
class Test extends AbstractAnnotation
{
    public function __construct(public array $bar, public int $baz = 0)
    {
    }
}
/*
 * 使用注解类：
 * use App\Annotation\Foo;
 *
 * #[Foo(bar: [1, 2], baz: 3)]
 * class IndexController extends AbstractController
 * {
 * // 利用注解数据
 * }
 */
